//
// Created by darcy on 4/30/21.
//

#include "../Include/Account.h"
#include <iostream>

using namespace std;

Account::Account(double b) { balance = b; }

void Account::credit(double m) { balance += m; }

bool Account::debit(double m) {
    if (m > balance) {
        cout << "Debit amount exceeded account balance" << endl;
        return false;
    } else {
        balance -= m;
        return true;
    }
}

double Account::getBalance() { return balance; }
